package com.topsail.demo.xxx.task.job;

import com.topsail.demo.xxx.api.Rest;
import com.topsail.demo.xxx.api.facade.BrandFacade;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * <B>主类名称：</B>DemoSimpleJob<BR>
 * <B>概要说明：</B>简单定时任务<BR>
 *
 * @author steven.zhou
 * 
 * @since 2022年08月08日 9:07
 */
@Slf4j
@Component
public class DemoSimpleJob {

    @DubboReference(check = false)
    private BrandFacade brandFacade;

    @Scheduled(initialDelay = 2000, fixedDelay = 2000)
    public void execute() {
        Rest china = brandFacade.sayHi("china");
        System.err.println(">>>>>>>>>>>>>>>>>>>>>>>>> " + china.getData());
    }
}
